'use strict'

//---------------------------------
// The PaymentRanger Angular App
var prApp = angular.module('PaymentRanger', [ 'AccountServices','ngResource','ui.bootstrap' ]);

//---------------------------------
// create URL Routing table
prApp.config(['$routeProvider', function($routeProvider) {
    $routeProvider.
      when('/Ranger/start', { templateUrl: '/Ranger/content/landing.html', controller: AccessCtrl }).  
      when('/Ranger', {redirectTo: '/Ranger/start'});
    }]);

//------------------------------------------------------------------------
// PspyGear wants form encoded data (at this time) so we set 
// 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
// and a use a data pass through override.
prApp.config(function ($httpProvider) {
	$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
    $httpProvider.defaults.transformRequest = function(data){
    	return data != undefined ? data : null;
    }
});
